import {
  Http
} from '../noAuthRequest.js';
const app = getApp()
export class Index extends Http {
  constructor() {
    super();
  }

  logout() {
    return this.request({
      url: 'logout',
      method: app.globalData.POST
    });
  }

  loginByPassword(data) {
    return this.request({
      url: 'wechat/login',
      data: data,
      method: app.globalData.POST,
      type: app.globalData.typePOST
    });
  }

  loginByCode(data) {
    return this.request({
      url: 'wechat/mini/logincode',
      data: data,
      method: app.globalData.POST,
      type: app.globalData.typePOST
    });
  }
}